package com.karry.yl.service.financial;


import com.karry.commons.base.SuperService;
import com.karry.yl.domain.financial.Receipt;
import com.karry.yl.domain.financial.ReceiptItems;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface ReceiptService extends SuperService<Receipt> {

    void save(Receipt receipt, List<ReceiptItems> items);

    void update(Receipt receipt, List<ReceiptItems> items);

    String updateCode(String oldCode);

    void delete(List<Long> ids);

    void updateStatusForPayment(String code, BigDecimal realAmount,int paymentMethod);

    /**
     * 判断订单是否已经支付
     * @param code
     * @return
     */
    boolean isPaid(String code);

    /**
     * 账单支付
     */

    Map<String,String> pay(Map<String,String> params);

    /**
     * 关闭支付账单
     * @param code  账单编号
     */
    void closeTrade(String code,String key);
}
